<?php
namespace Api\Controller;

use Shop\Api\SuggestApi;

/**
 *
 * 意见反馈接口
 * Class SuggestController
 * @package APi\Controller
 */
class SuggestController extends ApiController{

    /**
     *
     */
    public function add(){

        $uid = $this->_post('uid','','用户ID必须');
        $text = $this->_post('text','','反馈内容必须!');

        $map=array(
            'name'=>'',
            'text'=>$text,
            'uid'=>$uid,
        );
        $result=apiCall(SuggestApi::ADD,array($map));
        if($result['status']){
            $this->apiReturnSuc("感谢您的反馈!");
        }else{
            $this->apiReturnErr("操作失败!");
        }
    }

}